#!/usr/bin/evn python
# coding:utf-8
import os

how_many_delete=0
total_frame = 0
anno_path = "/home/sean/data/ILSVRC/Annotations/VID/train_remove_noobject/"
log_file = '/home/sean/data/ILSVRC/ImageSets/VID/train_no_object.txt'

on_object_log = open(log_file, 'r')
on_object_lines = on_object_log.readlines()

num=0
for line in open(log_file, 'r'):
    xml_path = os.path.join(anno_path, line[:-1] + '.xml')
    os.remove(xml_path)
    num += 1
print(num)




